module.exports = `
const Sequelize = require('sequelize')
/**
 * #{TableComment}#
 **/
const tableName = '#{TableName}#'
const tableColumns = {
    #{TableColumns}#
}
const defineOptions = {
    freezeTableName: true, 
    timestamps: false, 
    underscorder: true
}

class #{ClassName}# {
    constructor (sequelize) {
        this.sequelize = sequelize
    }

    getModel () {
        const model = this.sequelize.define(
            tableName,
            tableColumns,
            defineOptions
        )
        let columnNameSet = new Set(Object.keys(tableColumns))
        if (columnNameSet.has('id') === false) model.removeAttribute('id')
        return model
    }
}

module.exports = #{ClassName}#
`
